<%@ page import='parserxml.*'%>
<%
Traductor traduc = new Traductor();
//Suma s = new Suma();
String dtd = request.getParameter("dtd");
String esquema = "";

if (dtd != null && !dtd.equals("")) {
    traduc.ejecutarTraductorCadena(dtd);
    esquema = traduc.generarSchema();
}

out.clear();
//out.print(Integer.toString(sumados));	
out.print(esquema);

// Check that we have a file upload request
boolean isMultipart = ServletFileUpload.isMultipartContent(request);

// Create a factory for disk-based file items
DiskFileItemFactory factory = new DiskFileItemFactory();

// Set factory constraints
factory.setSizeThreshold(yourMaxMemorySize);
factory.setRepository(yourTempDirectory);

// Create a new file upload handler
ServletFileUpload upload = new ServletFileUpload(factory);

// Set overall request size constraint
upload.setSizeMax(yourMaxRequestSize);

// Parse the request
List /* FileItem */ items = upload.parseRequest(request);
// Process the uploaded items
Iterator iter = items.iterator();
while (iter.hasNext()) {
FileItem item = (FileItem) iter.next();

    if (!item.isFormField()) {

        // Process a file upload
        if (false) {
            File uploadedFile = new File(...);
            item.write(uploadedFile);
        } else {
            InputStream uploadedStream = item.getInputStream();
            ...
            uploadedStream.close();
        }
    }
}

%>